import React, { Component } from 'react'
import { HashRouter,NavLink } from 'react-router-dom'
import Routerview from '../router/rules'
import rules from '../router/router'
import '../assert/css/Layout.css'

export default class Layout extends Component {
    render() {
        return (
            <div>
                <HashRouter>
                    <Routerview routes={rules}></Routerview>
                </HashRouter>
                <div className="tabbar">
                    <NavLink activeClassName="router-link-active" className="icon icon-home" to='/home'>
                        商城
                    </NavLink>
                    <NavLink activeClassName="router-link-active" className="icon icon-cate" to='/cate'>
                        分类
                    </NavLink>
                    <NavLink activeClassName="router-link-active" className="icon icon-cart" to='/cart'>
                        <span className="badge">5</span>
                        购物车
                    </NavLink>
                    <NavLink activeClassName="router-link-active" className="icon icon-user" to='/uncenter'>
                        我的
                    </NavLink>
                </div>
            </div>
        )
    }
}
